Groth16 Slides

Groth16

  • A successor to Pinocchio
  • Proofs are 3 elements, rather than 8
  • Verification is 3 pairings, rather than 12

Trusted Setup

α,β,τ,γ,δrandom scalars[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ)δ, τn3t(τ)δ, ..., τt(τ)δ, t(τ)δ]SRS for h(τ)t(τ)\begin{aligned} \alpha,\beta,\tau,\gamma,\delta &\leftarrow& \text{random scalars}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow& \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow& \text{SRS for } \mathbb{G}_2\\ \\ [\frac{\tau^{n-2}t(\tau)}{\delta},\ \frac{\tau^{n-3}t(\tau)}{\delta},\ ...,\ \frac{\tau t(\tau)}{\delta},\ \frac{t(\tau)}{\delta}] &\leftarrow&\text{SRS for } h(\tau)t(\tau)\\ \\ \end{aligned}
Used with public portion of witness[Ψ1]1=αv1(τ)+βu1(τ)+w1(τ)γG1[Ψ2]1=αv2(τ)+βu2(τ)+w2(τ)γG1[Ψl]1=αvl(τ)+βul(τ)+wl(τ)γG1Used with private portion of witness[Ψl+1]1=αvl+1(τ)+βul+1(1τ)+wl+1(τ)δG1[Ψl+2]1=αvl+2(τ)+βul+2(τ)+wl+2(τ)δG1[Ψm]1=αvm(τ)+βum(τ)+wm(τ)δG1\begin{aligned} &&\text{Used with public portion of witness}\\ [\Psi_1]_1&=&\frac{\alpha v_1(\tau)+\beta u_1(\tau) + w_1(\tau)}{\gamma}G_1\\ [\Psi_2]_1&=&\frac{\alpha v_2(\tau)+\beta u_2(\tau) + w_2(\tau)}{\gamma}G_1\\ \vdots&&\\ [\Psi_l]_1&=&\frac{\alpha v_l(\tau)+\beta u_l(\tau) + w_l(\tau)}{\gamma}G_1\\ \\ &&\text{Used with private portion of witness}\\ [\Psi_{l+1}]_1&=&\frac{\alpha v_{l+1}(\tau)+\beta u_{l+1}(1\tau) + w_{l+1}(\tau)}{\delta}G_1\\ [\Psi_{l+2}]_1&=&\frac{\alpha v_{l+2}(\tau)+\beta u_{l+2}(\tau) + w_{l+2}(\tau)}{\delta}G_1\\ \vdots&&\\ [\Psi_m]_1&=&\frac{\alpha v_m(\tau)+\beta u_m(\tau) + w_m(\tau)}{\delta}G_1\\ \end{aligned}

Publishes ([α]1, [β]1[β]2, [γ]2, [δ]1[δ]2, SRSG1, SRSG2, [Ψ1]1, [Ψ2]1, ...,[Ψm]1)([\alpha]_1,\ [\beta]_1[\beta]_2,\ [\gamma]_2,\ [\delta]_1[\delta]_2,\ SRS_{G_1},\ SRS_{G_2},\ [\Psi_1]_1,\ [\Psi_2]_1,\ ..., [\Psi_m]_1)

Base

Trusted Setupτrandom scalar, toxic waste[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ), τn3t(τ), ..., τt(τ), t(τ)]SRS for h(τ)t(τ)Publishes[SRSG1,SRSG2,SRSh(τ)t(τ)]Prover[A]1=i=1maiu(τ)[B]2=i=1maiv(τ)[C]1=i=1maiw(τ)+h(τ)t(τ)Verifier[A]1[B]2=?[C]1[G]2\begin{aligned} \text{Trusted Setup}\\ \tau &\leftarrow \text{random scalar, toxic waste}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow \text{SRS for } \mathbb{G}_2\\ [\tau^{n-2}t(\tau),\ \tau^{n-3}t(\tau),\ ...,\ \tau t(\tau),\ t(\tau)] &\leftarrow\text{SRS for } h(\tau)t(\tau)\\ \\ \text{Publishes}\\ [SRS_{\mathbb{G}_1}, SRS&_{\mathbb{G}_2}, SRS_{h(\tau)t(\tau)}]\\ \\ \text{Prover}\\ [A]_1&=\sum^m_{i=1}a_iu(\tau)\\ [B]_2&=\sum^m_{i=1}a_iv(\tau)\\ [C]_1&=\sum^m_{i=1}a_iw(\tau)+h(\tau)t(\tau)\\ \\ \text{Verifier}\\ [A]_1\bullet[B]_2&\stackrel{?}{=}[C]_1\bullet[G]_2\\ \end{aligned}

Soundness

Trusted Setupα,β,τrandom scalars, toxic waste[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ), τn3t(τ), ..., τt(τ), t(τ)]SRS for h(τ)t(τ)[Ψ1]1=αv1(τ)+βu1(τ)+w1(τ)[Ψm]1=αvm(τ)+βum(τ)+wm(τ)Publishes([α]1,[β]2,SRSG1,SRSG2,SRSh(τ)t(τ),[Ψ1]1,...[Ψm]1)Prover[A]1=[α]1+i=1maiu(τ)[B]2=[β]2+i=1maiv(τ)[C]1=i=1mai[Ψ]i+h(τ)t(τ)Verifier[A]1[B]2=?[α]1[β]2+[C]1[G]2\begin{aligned} \text{Trusted Setup}\\ \alpha,\beta,\tau &\leftarrow \text{random scalars, toxic waste}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow \text{SRS for } \mathbb{G}_2\\ [\tau^{n-2}t(\tau),\ \tau^{n-3}t(\tau),\ ...,\ \tau t(\tau),\ t(\tau)] &\leftarrow\text{SRS for } h(\tau)t(\tau)\\ \\ [\Psi_1]_1&=\alpha v_1(\tau)+\beta u_1(\tau)+w_1(\tau)\\ &\vdots\\ [\Psi_m]_1&=\alpha v_m(\tau)+\beta u_m(\tau)+w_m(\tau)\\ \\ \text{Publishes}\\ ([\alpha]_1, [\beta]_2, SRS_{\mathbb{G}_1}, SRS&_{\mathbb{G}_2}, SRS_{h(\tau)t(\tau)}, [\Psi_1]_1,...[\Psi_m]_1)\\ \\ \text{Prover}\\ [A]_1&=[\alpha]_1 + \sum^m_{i=1}a_iu(\tau)\\ [B]_2&=[\beta]_2 + \sum^m_{i=1}a_iv(\tau)\\ [C]_1&=\sum^m_{i=1}a_i[\Psi]_i+h(\tau)t(\tau)\\ \\ \text{Verifier}\\ [A]_1\bullet[B]_2&\stackrel{?}{=} [\alpha]_1 \bullet [\beta]_2 + [C]_1\bullet[G]_2\\ \end{aligned}

Part-public witness

Trusted Setupα,β,τrandom scalars, toxic waste[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ), τn3t(τ), ..., τt(τ), t(τ)]SRS for h(τ)t(τ)[Ψ1]1=αv1(τ)+βu1(τ)+w1(τ)[Ψm]1=αvm(τ)+βum(τ)+wm(τ)Publishes([α]1,[β]2,SRSG1,SRSG2,SRSh(τ)t(τ),[Ψ1]1,...[Ψm]1)Prover[A]1=[α]1+i=1maiu(τ)[B]2=[β]2+i=1maiv(τ)[C]1=i=l+1mai[Ψ]i+h(τ)t(τ)Verifier[X]1=i=1laiΨi[A]1[B]2=?[α]1[β]2+[X]1[G]2+[C]1[G]2\begin{aligned} \text{Trusted Setup}\\ \alpha,\beta,\tau &\leftarrow \text{random scalars, toxic waste}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow \text{SRS for } \mathbb{G}_2\\ [\tau^{n-2}t(\tau),\ \tau^{n-3}t(\tau),\ ...,\ \tau t(\tau),\ t(\tau)] &\leftarrow\text{SRS for } h(\tau)t(\tau)\\ \\ [\Psi_1]_1&=\alpha v_1(\tau)+\beta u_1(\tau)+w_1(\tau)\\ &\vdots\\ [\Psi_m]_1&=\alpha v_m(\tau)+\beta u_m(\tau)+w_m(\tau)\\ \\ \text{Publishes}\\ ([\alpha]_1, [\beta]_2, SRS_{\mathbb{G}_1}, SRS&_{\mathbb{G}_2}, SRS_{h(\tau)t(\tau)}, [\Psi_1]_1,...[\Psi_m]_1)\\ \\ \text{Prover}\\ [A]_1&=[\alpha]_1 + \sum^m_{i=1}a_iu(\tau)\\ [B]_2&=[\beta]_2 + \sum^m_{i=1}a_iv(\tau)\\ [C]_1&=\sum^m_{i=l+1}a_i[\Psi]_i+h(\tau)t(\tau)\\ \\ \text{Verifier}\\ [X]_1 &= \sum^l_{i=1}a_i\Psi_i\\ [A]_1\bullet[B]_2&\stackrel{?}{=} [\alpha]_1 \bullet [\beta]_2 + [X]_1 \bullet [G]_2 + [C]_1\bullet[G]_2\\ \end{aligned}

Fixing soundness

Trusted Setupα,β,τ,γ,δrandom scalars, toxic waste[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ)δ, τn3t(τ)δ, ..., τt(τ)δ, t(τ)δ]SRS for h(τ)t(τ)[Ψ1]1=αv1(τ)+βu1(τ)+w1(τ)γ[Ψl]1=αvl(τ)+βul(τ)+wl(τ)γ[Ψl+1]1=αvl+1(τ)+βul+1(τ)+wl+1(τ)δ[Ψm]1=αvm(τ)+βum(τ)+wm(τ)δPublishes([α]1,[β]2,[γ]2,[δ]2,SRSG1,SRSG2,SRSh(τ)t(τ),[Ψ1]1,...[Ψm]1)Prover[A]1=[α]1+i=1maiu(τ)[B]2=[β]2+i=1maiv(τ)[C]1=i=l+1mai[Ψ]i+h(τ)t(τ)Verifier[X]1=i=1laiΨi[A]1[B]2=?[α]1[β]2+[X]1[γ]2+[C]1[δ]2\begin{aligned} \text{Trusted Setup}\\ \alpha,\beta,\tau,\gamma,\delta &\leftarrow \text{random scalars, toxic waste}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow \text{SRS for } \mathbb{G}_2\\ [\frac{\tau^{n-2}t(\tau)}{\delta},\ \frac{\tau^{n-3}t(\tau)}{\delta},\ ...,\ \frac{\tau t(\tau)}{\delta},\ \frac{t(\tau)}{\delta}] &\leftarrow\text{SRS for } h(\tau)t(\tau)\\ \\ [\Psi_1]_1&=\frac{\alpha v_1(\tau)+\beta u_1(\tau)+w_1(\tau)}{\gamma}\\ &\vdots\\ [\Psi_l]_1&=\frac{\alpha v_l(\tau)+\beta u_l(\tau)+w_l(\tau)}{\gamma}\\ [\Psi_l+1]_1&=\frac{\alpha v_{l+1}(\tau)+\beta u_{l+1}(\tau)+w_{l+1}(\tau)}{\delta}\\ &\vdots\\ [\Psi_m]_1&=\frac{\alpha v_m(\tau)+\beta u_m(\tau)+w_m(\tau)}{\delta}\\ \\ \text{Publishes}\\ ([\alpha]_1, [\beta]_2, [\gamma]_2, [\delta]_2, SRS_{\mathbb{G}_1}, SRS&_{\mathbb{G}_2}, SRS_{h(\tau)t(\tau)}, [\Psi_1]_1,...[\Psi_m]_1)\\ \\ \text{Prover}\\ [A]_1&=[\alpha]_1 + \sum^m_{i=1}a_iu(\tau)\\ [B]_2&=[\beta]_2 + \sum^m_{i=1}a_iv(\tau)\\ [C]_1&=\sum^m_{i=l+1}a_i[\Psi]_i+h(\tau)t(\tau)\\ \\ \text{Verifier}\\ [X]_1 &= \sum^l_{i=1}a_i\Psi_i\\ [A]_1\bullet[B]_2&\stackrel{?}{=} [\alpha]_1 \bullet [\beta]_2 + [X]_1 \bullet [\gamma]_2 + [C]_1\bullet[\delta]_2\\ \end{aligned}

Enforcing Zero-Knowledge

Trusted Setupα,β,τ,γ,δrandom scalars[τn1G1, τn2G1, ..., τG1, G1]SRS for G1[τn1G2, τn2G2, ..., τG2, G2]SRS for G2[τn2t(τ)δ, τn3t(τ)δ, ..., τt(τ)δ, t(τ)δ]SRS for h(τ)t(τ)[Ψ1]1=αv1(τ)+βu1(τ)+w1(τ)γ[Ψl]1=αvl(τ)+βul(τ)+wl(τ)γ[Ψl+1]1=αvl+1(τ)+βul+1(τ)+wl+1(τ)δ[Ψm]1=αvm(τ)+βum(τ)+wm(τ)δPublishes([α]1,[β]1,[β]2,[γ]2,[δ]1,[δ]2,SRSG1,SRSG2,SRSh(τ)t(τ),[Ψ1]1,...[Ψm]1)Proverr,srandom scalars, toxic waste[A]1=[α]1+i=1maiu(τ)+r[δ]1[B]2=[β]2+i=1maiv(τ)+s[δ]1[C]1=i=l+1mai[Ψ]i+h(τ)t(τ)+[A]1s+[B]1rrs[δ]1Verifier[X]1=i=1laiΨi[A]1[B]2=?[α]1[β]2+[X]1[γ]2+[C]1[δ]2\begin{aligned} \text{Trusted Setup}\\ \alpha,\beta,\tau,\gamma,\delta &\leftarrow \text{random scalars}\\ [\tau^{n-1}G_1,\ \tau^{n-2}G_1,\ ...,\ \tau G_1,\ G_1] &\leftarrow \text{SRS for } \mathbb{G}_1\\ [\tau^{n-1}G_2,\ \tau^{n-2}G_2,\ ...,\ \tau G_2,\ G_2] &\leftarrow \text{SRS for } \mathbb{G}_2\\ [\frac{\tau^{n-2}t(\tau)}{\delta},\ \frac{\tau^{n-3}t(\tau)}{\delta},\ ...,\ \frac{\tau t(\tau)}{\delta},\ \frac{t(\tau)}{\delta}] &\leftarrow\text{SRS for } h(\tau)t(\tau)\\ \\ [\Psi_1]_1&=\frac{\alpha v_1(\tau)+\beta u_1(\tau)+w_1(\tau)}{\gamma}\\ &\vdots\\ [\Psi_l]_1&=\frac{\alpha v_l(\tau)+\beta u_l(\tau)+w_l(\tau)}{\gamma}\\ [\Psi_l+1]_1&=\frac{\alpha v_{l+1}(\tau)+\beta u_{l+1}(\tau)+w_{l+1}(\tau)}{\delta}\\ &\vdots\\ [\Psi_m]_1&=\frac{\alpha v_m(\tau)+\beta u_m(\tau)+w_m(\tau)}{\delta}\\ \\ \text{Publishes}\\ ([\alpha]_1, [\beta]_1, [\beta]_2, [\gamma]_2, [\delta]_1, [\delta]_2,SRS_{\mathbb{G}_1}&, SRS_{\mathbb{G}_2}, SRS_{h(\tau)t(\tau)}, [\Psi_1]_1,...[\Psi_m]_1)\\ \\ \text{Prover}\\ r,s &\leftarrow \text{random scalars, toxic waste}\\ [A]_1&=[\alpha]_1 + \sum^m_{i=1}a_iu(\tau) + r[\delta]_1\\ [B]_2&=[\beta]_2 + \sum^m_{i=1}a_iv(\tau) + s[\delta]_1\\ [C]_1&=\sum^m_{i=l+1}a_i[\Psi]_i+h(\tau)t(\tau) + [A]_1s + [B]_1r - rs[\delta]_1\\ \\ \text{Verifier}\\ [X]_1 &= \sum^l_{i=1}a_i\Psi_i\\ [A]_1\bullet[B]_2&\stackrel{?}{=} [\alpha]_1 \bullet [\beta]_2 + [X]_1 \bullet [\gamma]_2 + [C]_1\bullet[\delta]_2\\ \end{aligned}

QAP Setup

awitness vectorOOutput matrixLLHS MatrixRRHS MatrixOa=LaRaOai=1maiwi(x)w(x)Lai=1maiui(x)u(x)Rai=1maivi(x)v(x)Oa=LaRaw(x)=u(x)v(x)+b(x)\begin{aligned} a &\leftarrow \text{witness vector}\\ O &\leftarrow \text{Output matrix}\\ L &\leftarrow \text{LHS Matrix}\\ R &\leftarrow \text{RHS Matrix}\\ \\ Oa &=La\cdot Ra\\\\ & \big\downarrow\\\\ Oa &\rightarrow \sum_{i=1}^ma_iw_i(x) \rightarrow w(x)\\ La &\rightarrow \sum_{i=1}^ma_iu_i(x) \rightarrow u(x)\\ Ra &\rightarrow \sum_{i=1}^ma_iv_i(x) \rightarrow v(x)\\ Oa = La\cdot Ra &\rightarrow w(x) = u(x)\cdot v(x) + b(x)\\ \end{aligned}